package com.msw.trustauth.rest;

import com.alibaba.dubbo.config.annotation.Reference;
import com.msw.TeacherService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mashuangwei
 * @title: ConsumerController
 * @projectName dubbo-consumer
 * @description: TODO
 * @date 2021-03-15
 */
@RestController
public class ConsumerController {

    @Reference(check = false)
    private TeacherService teacherService;

    @GetMapping("/add")
    public ResponseEntity<Object> query(){
        return new ResponseEntity<Object>(teacherService.addTeacher("hi boy"), HttpStatus.OK);
    }
}
